#include <iostream>
#include <stack>
using namespace std;

class MinStack {
private:
    stack<int> _st;
    stack<int> _minst;

public:
    MinStack() {

    }

    void push(int val) {
        if (_minst.empty()) _minst.push(val);
        else
            if (val <= _minst.top()) _minst.push(val);
        _st.push(val);
    }

    void pop() {
        if (_st.top() == _minst.top()) _minst.pop();
        _st.pop();
    }

    int top() {
        return _st.top();
    }

    int getMin() {
        return _minst.top();
    }
};

/**
 * Your MinStack object will be instantiated and called as such:
 * MinStack* obj = new MinStack();
 * obj->push(val);
 * obj->pop();
 * int param_3 = obj->top();
 * int param_4 = obj->getMin();
 */

int main()
{
	return 0;
}